<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

    <style>

        .container1 {
            margin-top: 70px;
            width: 45%;
            margin-left: 30%;
        }

        /* 需要在一行的元素 */
        .inline-style {
            display: inline-block;
        }
        /* 文字需要靠右 */
        .font-position-right{
            text-align: right;
        }
        /* 注册按钮 */
        .register-btn{
            margin-left: 10%;
        }


    </style>
</head>
<body>
<div class="container1">

    <form class="form-horizontal"  th:action="@{/user/regsiter}" method="post">
        <div class="form-group">
            <!--<h2 class="form-signin-heading">注册</h2>-->
            <!-- class="sr-only"将label标签隐藏 -->
            <label for="Username" class="col-sm-2 control-label inline-style font-position-right">用户名</label>
            <div class="col-sm-9 inline-style ">
                <input type="text" class="form-control"   name="Username" placeholder="用户名">
            </div>
        </div>

        <div class="form-group">
            <label for="realname" class="col-sm-2 control-label  inline-style font-position-right">真实姓名</label>
            <div class="col-sm-9  inline-style">
                <input type="text" class="form-control" name="realname" placeholder="真实姓名">
            </div>
            <div class="form-group">
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label   inline-style font-position-right">密码</label>
            <div class="col-sm-9  inline-style">
                <input type="tel" class="form-control"  name="password" placeholder="密码">
            </div>
        </div>
        <div class="form-group">
            <label for="sex" class="col-sm-2 control-label   inline-style font-position-right">性别</label>
            <div class="col-sm-9  inline-style">
                <label class="radio-inline">
                    <input type="radio" name="sex"  value="男" checked> 男
                </label>
                <label class="radio-inline">
                    <input type="radio" name="sex" value="女"> 女
                </label>
            </div>
        </div>
        <div class="form-group">
            <label for="yzm" class="col-sm-2 control-label   inline-style font-position-right">验证码</label>
            <div class="col-sm-3 "><img th:src="@{./user/code}" width="100px" height="30px" id="num"/> <a href="javascript:;" onclick="document.getElementById('num').src='/ems/user/code?'+(new Date()).getTime()">更换</a> </div>
            <div class="col-sm-5  inline-style">
                <input type="text" class="form-control" id="code" name="code" placeholder="验证码">
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 col-sm-10">
                <button class="btn btn-lg btn-primary btn-block register-btn" type="submit">注册</button>
            </div>

        </div>
    </form>

</div>

</body>
</html>